<!--
 * @Date: 2022-07-12 23:37:57
 * @LastEditTime: 2022-07-14 05:58:58
-->
<template>
  <div class="usc-main">
    <img :src="avatorUrl + userInfo.pic" alt="" class="usc-img">
    <div>
      <div>{{userInfo.nickname}}</div>
      <!-- <el-button class="usc-chat-message" type="primary" size="mini">查看更多</el-button> -->
    </div>
    <el-button class="usc-chat-message" type="primary" size="mini" @click="routerTo(userInfo.uid)">查看详情</el-button>
  </div>
</template>

<script>
export default {
  name: 'UserContainer',
  props: {
    userInfo: {}
  },
  data () {
    return {
      avatorUrl: this.picbed + '/avator/'
    }
  },
  mounted () {
    console.log(this.userInfo)
  },
  methods: {
    routerTo: function (id) {
      this.$router.push('/user/' + id)
    }
  }
}
</script>

<style>
.usc-main {
  height: 150px;
  width: 120px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.usc-main:hover {
  background: rgb(228, 229, 230);
}
.usc-img {
  border-radius: 100%;
  width: 100px;
  height: 100px;
}
.usc-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* .uc-chat-message {
  height: 15px;
  color: #999;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  width: 140px;
  text-overflow: ellipsis;
} */
</style>
